{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "3xW4O0zuKfWD"
      },
      "outputs": [],
      "source": [
        "import os\n",
        "from openai import OpenAI\n",
        "import rich\n",
        "from google.colab import userdata"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "api_key = userdata.get('OPENAI_API_KEY')\n",
        "MODEL = \"gpt-4o-mini\"\n",
        "\n",
        "openai = OpenAI(api_key=api_key)"
      ],
      "metadata": {
        "id": "vUydnLeLKs03"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "Search the web for the latest information before generating a response\n",
        "\n",
        "1) In Chat API, model always retrieves information from web before responding to your query\n",
        "\n",
        "2) In Responses API, you enable web search by configuring it in the tools, and model can choose to serach the web or not based on the content of the input prompt."
      ],
      "metadata": {
        "id": "blCx6gu1Vl46"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "To refine search results based on geography, you can specify the user's approximate location using parameters such as country, city, region, and/or timezone."
      ],
      "metadata": {
        "id": "wSqr0gLd4CmV"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "# Chat Completion API\n",
        "\n",
        "https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat"
      ],
      "metadata": {
        "id": "5wlqKfVBKyjD"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "Always search the web first"
      ],
      "metadata": {
        "id": "79PCOO9i3Yel"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "Note: The `user_location` object can be configured as shown below to specify the approximate user location in the search options\n",
        "```\n",
        "web_search_options={\n",
        "    \"user_location\": {\n",
        "        \"type\": \"approximate\",\n",
        "        \"approximate\": {\n",
        "            \"country\": \"GB\",\n",
        "            \"city\": \"London\",\n",
        "            \"region\": \"London\",\n",
        "        }\n",
        "    },\n",
        "},\n",
        "\n",
        "```"
      ],
      "metadata": {
        "id": "GYwnPiN5b8gf"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "response = openai.chat.completions.create(\n",
        "    model=\"gpt-4o-search-preview\",\n",
        "    web_search_options={\n",
        "        \"user_location\": {\n",
        "            \"type\": \"approximate\",\n",
        "            \"approximate\": {\n",
        "                \"country\": \"PK\",\n",
        "                \"city\": \"Karachi\",\n",
        "                \"region\": \"Sindh\",\n",
        "            }\n",
        "        },\n",
        "    },\n",
        "    messages=[\n",
        "        {\n",
        "            \"role\": \"user\",\n",
        "            \"content\": \"List the best restaurants for Seafood\",\n",
        "        }\n",
        "    ],\n",
        ")\n",
        "\n",
        "print(response.choices[0].message.content)\n",
        "# rich.print(response)\n",
        "print(len(response.choices[0].message.annotations))\n",
        "rich.print(response.choices[0].message.annotations)"
      ],
      "metadata": {
        "id": "dBrUkMCUKz0s",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        },
        "outputId": "f13d09ff-81b9-4c5b-ad6b-f0861270b181"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Karachi, with its coastal location, boasts a vibrant seafood dining scene. Here are some of the top seafood restaurants in the city:\n",
            "\n",
            "**[Kolachi Restaurant](https://www.google.com/maps/search/Kolachi+Restaurant%2C+Karachi%2C+Pakistan)**\n",
            "_Karachi, Pakistan_\n",
            "Situated along the Arabian Sea, Kolachi offers a picturesque dining experience with a diverse seafood menu, including their signature Kolachi Karahi—a flavorful blend of fresh fish, shrimp, and spices.\n",
            "\n",
            "**[Okra](https://www.google.com/maps/search/Okra%2C+Karachi%2C+Pakistan)**\n",
            "_Karachi, Pakistan_\n",
            "Located in the Bukhari Commercial area, Okra specializes in Mediterranean and Asian-inspired seafood dishes, such as Grilled Sea Bass and Seafood Paella, all prepared with fresh ingredients.\n",
            "\n",
            "**[The Patio](https://www.google.com/maps/search/The+Patio%2C+Karachi%2C+Pakistan)**\n",
            "_Karachi, Pakistan_\n",
            "Nestled in Frere Town, The Patio offers a cozy ambiance with outdoor seating and a menu featuring Mediterranean-inspired seafood like Grilled King Prawns and Seafood Tagine.\n",
            "\n",
            "**[Café Flo](https://www.google.com/maps/search/Caf%C3%A9+Flo%2C+Karachi%2C+Pakistan)**\n",
            "_Karachi, Pakistan_\n",
            "Known for its refined French cuisine, Café Flo serves seafood delicacies such as Pan-Seared Salmon and Bouillabaisse, providing an elegant dining experience in Clifton.\n",
            "\n",
            "**[Savor Seafood Lounge](https://www.google.com/maps/search/Savor+Seafood+Lounge%2C+Karachi%2C+Pakistan)**\n",
            "_Karachi, Pakistan_\n",
            "Located in DHA, Savor Seafood Lounge offers a sophisticated setting with a menu featuring traditional karahi-style fish, prawn masalas, and seafood platters.\n",
            "\n",
            "**[N’eco’s Natural Store & Cafe](https://www.google.com/maps/search/N%E2%80%99eco%E2%80%99s+Natural+Store+%26+Cafe%2C+Karachi%2C+Pakistan)**\n",
            "_Karachi, Pakistan_\n",
            "Focusing on organic and locally sourced ingredients, N’eco’s offers healthy seafood options like grilled fish with lemon herb sauce and shrimp and avocado salad in a warm, inviting atmosphere.\n",
            "\n",
            "**[Oyster Bay](https://www.google.com/maps/search/Oyster+Bay%2C+Karachi%2C+Pakistan)**\n",
            "_Karachi, Pakistan_\n",
            "Oyster Bay is renowned for its fresh seafood offerings, including Cajun Buttery Shrimps, black pepper crab, and Herb & Garlic Grilled fish, celebrating the natural flavors of the ocean.\n",
            "\n",
            "**[Liaquat Bhai Fish Master](https://www.google.com/maps/search/Liaquat+Bhai+Fish+Master%2C+Karachi%2C+Pakistan)**\n",
            "_Karachi, Pakistan_\n",
            "A local favorite, Liaquat Bhai Fish Master is known for its fresh fish prepared with traditional flavors, offering dishes like tender grilled fish and spicy masala fried fish.\n",
            "\n",
            "**[Rashid Seafood](https://www.google.com/maps/search/Rashid+Seafood%2C+Karachi%2C+Pakistan)**\n",
            "_Karachi, Pakistan_\n",
            "Rashid Seafood is recognized for its seafood dishes that balance spices and seasoning, with their fried fish being particularly irresistible.\n",
            "\n",
            "**[Akram Fish Point](https://www.google.com/maps/search/Akram+Fish+Point%2C+Karachi%2C+Pakistan)**\n",
            "_Karachi, Pakistan_\n",
            "A hidden gem for seafood enthusiasts, Akram Fish Point offers specialties like fried Mushka finger, Spec fish, and tandoori prawns in a quality-focused atmosphere.\n",
            "\n",
            "These establishments offer a range of seafood experiences, from traditional Pakistani flavors to Mediterranean and Asian-inspired dishes, catering to diverse palates in Karachi. \n",
            "10\n"
          ]
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[1m[\u001b[0m\n",
              "    \u001b[1;35mAnnotation\u001b[0m\u001b[1m(\u001b[0m\n",
              "        \u001b[33mtype\u001b[0m=\u001b[32m'url_citation'\u001b[0m,\n",
              "        \u001b[33murl_citation\u001b[0m=\u001b[1;35mAnnotationURLCitation\u001b[0m\u001b[1m(\u001b[0m\n",
              "            \u001b[33mend_index\u001b[0m=\u001b[1;36m234\u001b[0m,\n",
              "            \u001b[33mstart_index\u001b[0m=\u001b[1;36m136\u001b[0m,\n",
              "            \u001b[33mtitle\u001b[0m=\u001b[32m'Kolachi Restaurant'\u001b[0m,\n",
              "            \u001b[33murl\u001b[0m=\u001b[32m'https://www.google.com/maps/search/Kolachi+Restaurant%2C+Karachi%2C+Pakistan'\u001b[0m\n",
              "        \u001b[1m)\u001b[0m\n",
              "    \u001b[1m)\u001b[0m,\n",
              "    \u001b[1;35mAnnotation\u001b[0m\u001b[1m(\u001b[0m\n",
              "        \u001b[33mtype\u001b[0m=\u001b[32m'url_citation'\u001b[0m,\n",
              "        \u001b[33murl_citation\u001b[0m=\u001b[1;35mAnnotationURLCitation\u001b[0m\u001b[1m(\u001b[0m\n",
              "            \u001b[33mend_index\u001b[0m=\u001b[1;36m532\u001b[0m,\n",
              "            \u001b[33mstart_index\u001b[0m=\u001b[1;36m462\u001b[0m,\n",
              "            \u001b[33mtitle\u001b[0m=\u001b[32m'Okra'\u001b[0m,\n",
              "            \u001b[33murl\u001b[0m=\u001b[32m'https://www.google.com/maps/search/Okra%2C+Karachi%2C+Pakistan'\u001b[0m\n",
              "        \u001b[1m)\u001b[0m\n",
              "    \u001b[1m)\u001b[0m,\n",
              "    \u001b[1;35mAnnotation\u001b[0m\u001b[1m(\u001b[0m\n",
              "        \u001b[33mtype\u001b[0m=\u001b[32m'url_citation'\u001b[0m,\n",
              "        \u001b[33murl_citation\u001b[0m=\u001b[1;35mAnnotationURLCitation\u001b[0m\u001b[1m(\u001b[0m\n",
              "            \u001b[33mend_index\u001b[0m=\u001b[1;36m829\u001b[0m,\n",
              "            \u001b[33mstart_index\u001b[0m=\u001b[1;36m749\u001b[0m,\n",
              "            \u001b[33mtitle\u001b[0m=\u001b[32m'The Patio'\u001b[0m,\n",
              "            \u001b[33murl\u001b[0m=\u001b[32m'https://www.google.com/maps/search/The+Patio%2C+Karachi%2C+Pakistan'\u001b[0m\n",
              "        \u001b[1m)\u001b[0m\n",
              "    \u001b[1m)\u001b[0m,\n",
              "    \u001b[1;35mAnnotation\u001b[0m\u001b[1m(\u001b[0m\n",
              "        \u001b[33mtype\u001b[0m=\u001b[32m'url_citation'\u001b[0m,\n",
              "        \u001b[33murl_citation\u001b[0m=\u001b[1;35mAnnotationURLCitation\u001b[0m\u001b[1m(\u001b[0m\n",
              "            \u001b[33mend_index\u001b[0m=\u001b[1;36m1112\u001b[0m,\n",
              "            \u001b[33mstart_index\u001b[0m=\u001b[1;36m1029\u001b[0m,\n",
              "            \u001b[33mtitle\u001b[0m=\u001b[32m'Café Flo'\u001b[0m,\n",
              "            \u001b[33murl\u001b[0m=\u001b[32m'https://www.google.com/maps/search/Caf%C3%A9+Flo%2C+Karachi%2C+Pakistan'\u001b[0m\n",
              "        \u001b[1m)\u001b[0m\n",
              "    \u001b[1m)\u001b[0m,\n",
              "    \u001b[1;35mAnnotation\u001b[0m\u001b[1m(\u001b[0m\n",
              "        \u001b[33mtype\u001b[0m=\u001b[32m'url_citation'\u001b[0m,\n",
              "        \u001b[33murl_citation\u001b[0m=\u001b[1;35mAnnotationURLCitation\u001b[0m\u001b[1m(\u001b[0m\n",
              "            \u001b[33mend_index\u001b[0m=\u001b[1;36m1409\u001b[0m,\n",
              "            \u001b[33mstart_index\u001b[0m=\u001b[1;36m1307\u001b[0m,\n",
              "            \u001b[33mtitle\u001b[0m=\u001b[32m'Savor Seafood Lounge'\u001b[0m,\n",
              "            \u001b[33murl\u001b[0m=\u001b[32m'https://www.google.com/maps/search/Savor+Seafood+Lounge%2C+Karachi%2C+Pakistan'\u001b[0m\n",
              "        \u001b[1m)\u001b[0m\n",
              "    \u001b[1m)\u001b[0m,\n",
              "    \u001b[1;35mAnnotation\u001b[0m\u001b[1m(\u001b[0m\n",
              "        \u001b[33mtype\u001b[0m=\u001b[32m'url_citation'\u001b[0m,\n",
              "        \u001b[33murl_citation\u001b[0m=\u001b[1;35mAnnotationURLCitation\u001b[0m\u001b[1m(\u001b[0m\n",
              "            \u001b[33mend_index\u001b[0m=\u001b[1;36m1729\u001b[0m,\n",
              "            \u001b[33mstart_index\u001b[0m=\u001b[1;36m1593\u001b[0m,\n",
              "            \u001b[33mtitle\u001b[0m=\u001b[32m'N’eco’s Natural Store & Cafe'\u001b[0m,\n",
              "            \u001b[33murl\u001b[0m=\u001b[32m'https://www.google.com/maps/search/N%E2%80%99eco%E2%80%99s+Natural+Store+%26+Cafe%2C+Karachi%2C+Pa\u001b[0m\n",
              "\u001b[32mkistan'\u001b[0m\n",
              "        \u001b[1m)\u001b[0m\n",
              "    \u001b[1m)\u001b[0m,\n",
              "    \u001b[1;35mAnnotation\u001b[0m\u001b[1m(\u001b[0m\n",
              "        \u001b[33mtype\u001b[0m=\u001b[32m'url_citation'\u001b[0m,\n",
              "        \u001b[33murl_citation\u001b[0m=\u001b[1;35mAnnotationURLCitation\u001b[0m\u001b[1m(\u001b[0m\n",
              "            \u001b[33mend_index\u001b[0m=\u001b[1;36m2030\u001b[0m,\n",
              "            \u001b[33mstart_index\u001b[0m=\u001b[1;36m1948\u001b[0m,\n",
              "            \u001b[33mtitle\u001b[0m=\u001b[32m'Oyster Bay'\u001b[0m,\n",
              "            \u001b[33murl\u001b[0m=\u001b[32m'https://www.google.com/maps/search/Oyster+Bay%2C+Karachi%2C+Pakistan'\u001b[0m\n",
              "        \u001b[1m)\u001b[0m\n",
              "    \u001b[1m)\u001b[0m,\n",
              "    \u001b[1;35mAnnotation\u001b[0m\u001b[1m(\u001b[0m\n",
              "        \u001b[33mtype\u001b[0m=\u001b[32m'url_citation'\u001b[0m,\n",
              "        \u001b[33murl_citation\u001b[0m=\u001b[1;35mAnnotationURLCitation\u001b[0m\u001b[1m(\u001b[0m\n",
              "            \u001b[33mend_index\u001b[0m=\u001b[1;36m2352\u001b[0m,\n",
              "            \u001b[33mstart_index\u001b[0m=\u001b[1;36m2242\u001b[0m,\n",
              "            \u001b[33mtitle\u001b[0m=\u001b[32m'Liaquat Bhai Fish Master'\u001b[0m,\n",
              "            \u001b[33murl\u001b[0m=\u001b[32m'https://www.google.com/maps/search/Liaquat+Bhai+Fish+Master%2C+Karachi%2C+Pakistan'\u001b[0m\n",
              "        \u001b[1m)\u001b[0m\n",
              "    \u001b[1m)\u001b[0m,\n",
              "    \u001b[1;35mAnnotation\u001b[0m\u001b[1m(\u001b[0m\n",
              "        \u001b[33mtype\u001b[0m=\u001b[32m'url_citation'\u001b[0m,\n",
              "        \u001b[33murl_citation\u001b[0m=\u001b[1;35mAnnotationURLCitation\u001b[0m\u001b[1m(\u001b[0m\n",
              "            \u001b[33mend_index\u001b[0m=\u001b[1;36m2644\u001b[0m,\n",
              "            \u001b[33mstart_index\u001b[0m=\u001b[1;36m2554\u001b[0m,\n",
              "            \u001b[33mtitle\u001b[0m=\u001b[32m'Rashid Seafood'\u001b[0m,\n",
              "            \u001b[33murl\u001b[0m=\u001b[32m'https://www.google.com/maps/search/Rashid+Seafood%2C+Karachi%2C+Pakistan'\u001b[0m\n",
              "        \u001b[1m)\u001b[0m\n",
              "    \u001b[1m)\u001b[0m,\n",
              "    \u001b[1;35mAnnotation\u001b[0m\u001b[1m(\u001b[0m\n",
              "        \u001b[33mtype\u001b[0m=\u001b[32m'url_citation'\u001b[0m,\n",
              "        \u001b[33murl_citation\u001b[0m=\u001b[1;35mAnnotationURLCitation\u001b[0m\u001b[1m(\u001b[0m\n",
              "            \u001b[33mend_index\u001b[0m=\u001b[1;36m2906\u001b[0m,\n",
              "            \u001b[33mstart_index\u001b[0m=\u001b[1;36m2812\u001b[0m,\n",
              "            \u001b[33mtitle\u001b[0m=\u001b[32m'Akram Fish Point'\u001b[0m,\n",
              "            \u001b[33murl\u001b[0m=\u001b[32m'https://www.google.com/maps/search/Akram+Fish+Point%2C+Karachi%2C+Pakistan'\u001b[0m\n",
              "        \u001b[1m)\u001b[0m\n",
              "    \u001b[1m)\u001b[0m\n",
              "\u001b[1m]\u001b[0m\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">[</span>\n",
              "    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">Annotation</span><span style=\"font-weight: bold\">(</span>\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'url_citation'</span>,\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">url_citation</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AnnotationURLCitation</span><span style=\"font-weight: bold\">(</span>\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">end_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">234</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">start_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">136</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">title</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'Kolachi Restaurant'</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">url</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'https://www.google.com/maps/search/Kolachi+Restaurant%2C+Karachi%2C+Pakistan'</span>\n",
              "        <span style=\"font-weight: bold\">)</span>\n",
              "    <span style=\"font-weight: bold\">)</span>,\n",
              "    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">Annotation</span><span style=\"font-weight: bold\">(</span>\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'url_citation'</span>,\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">url_citation</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AnnotationURLCitation</span><span style=\"font-weight: bold\">(</span>\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">end_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">532</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">start_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">462</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">title</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'Okra'</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">url</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'https://www.google.com/maps/search/Okra%2C+Karachi%2C+Pakistan'</span>\n",
              "        <span style=\"font-weight: bold\">)</span>\n",
              "    <span style=\"font-weight: bold\">)</span>,\n",
              "    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">Annotation</span><span style=\"font-weight: bold\">(</span>\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'url_citation'</span>,\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">url_citation</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AnnotationURLCitation</span><span style=\"font-weight: bold\">(</span>\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">end_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">829</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">start_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">749</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">title</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'The Patio'</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">url</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'https://www.google.com/maps/search/The+Patio%2C+Karachi%2C+Pakistan'</span>\n",
              "        <span style=\"font-weight: bold\">)</span>\n",
              "    <span style=\"font-weight: bold\">)</span>,\n",
              "    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">Annotation</span><span style=\"font-weight: bold\">(</span>\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'url_citation'</span>,\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">url_citation</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AnnotationURLCitation</span><span style=\"font-weight: bold\">(</span>\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">end_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1112</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">start_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1029</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">title</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'Café Flo'</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">url</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'https://www.google.com/maps/search/Caf%C3%A9+Flo%2C+Karachi%2C+Pakistan'</span>\n",
              "        <span style=\"font-weight: bold\">)</span>\n",
              "    <span style=\"font-weight: bold\">)</span>,\n",
              "    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">Annotation</span><span style=\"font-weight: bold\">(</span>\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'url_citation'</span>,\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">url_citation</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AnnotationURLCitation</span><span style=\"font-weight: bold\">(</span>\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">end_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1409</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">start_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1307</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">title</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'Savor Seafood Lounge'</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">url</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'https://www.google.com/maps/search/Savor+Seafood+Lounge%2C+Karachi%2C+Pakistan'</span>\n",
              "        <span style=\"font-weight: bold\">)</span>\n",
              "    <span style=\"font-weight: bold\">)</span>,\n",
              "    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">Annotation</span><span style=\"font-weight: bold\">(</span>\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'url_citation'</span>,\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">url_citation</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AnnotationURLCitation</span><span style=\"font-weight: bold\">(</span>\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">end_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1729</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">start_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1593</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">title</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'N’eco’s Natural Store &amp; Cafe'</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">url</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'https://www.google.com/maps/search/N%E2%80%99eco%E2%80%99s+Natural+Store+%26+Cafe%2C+Karachi%2C+Pa</span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">kistan'</span>\n",
              "        <span style=\"font-weight: bold\">)</span>\n",
              "    <span style=\"font-weight: bold\">)</span>,\n",
              "    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">Annotation</span><span style=\"font-weight: bold\">(</span>\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'url_citation'</span>,\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">url_citation</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AnnotationURLCitation</span><span style=\"font-weight: bold\">(</span>\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">end_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2030</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">start_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1948</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">title</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'Oyster Bay'</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">url</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'https://www.google.com/maps/search/Oyster+Bay%2C+Karachi%2C+Pakistan'</span>\n",
              "        <span style=\"font-weight: bold\">)</span>\n",
              "    <span style=\"font-weight: bold\">)</span>,\n",
              "    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">Annotation</span><span style=\"font-weight: bold\">(</span>\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'url_citation'</span>,\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">url_citation</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AnnotationURLCitation</span><span style=\"font-weight: bold\">(</span>\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">end_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2352</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">start_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2242</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">title</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'Liaquat Bhai Fish Master'</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">url</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'https://www.google.com/maps/search/Liaquat+Bhai+Fish+Master%2C+Karachi%2C+Pakistan'</span>\n",
              "        <span style=\"font-weight: bold\">)</span>\n",
              "    <span style=\"font-weight: bold\">)</span>,\n",
              "    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">Annotation</span><span style=\"font-weight: bold\">(</span>\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'url_citation'</span>,\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">url_citation</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AnnotationURLCitation</span><span style=\"font-weight: bold\">(</span>\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">end_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2644</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">start_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2554</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">title</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'Rashid Seafood'</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">url</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'https://www.google.com/maps/search/Rashid+Seafood%2C+Karachi%2C+Pakistan'</span>\n",
              "        <span style=\"font-weight: bold\">)</span>\n",
              "    <span style=\"font-weight: bold\">)</span>,\n",
              "    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">Annotation</span><span style=\"font-weight: bold\">(</span>\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'url_citation'</span>,\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">url_citation</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AnnotationURLCitation</span><span style=\"font-weight: bold\">(</span>\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">end_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2906</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">start_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">2812</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">title</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'Akram Fish Point'</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">url</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'https://www.google.com/maps/search/Akram+Fish+Point%2C+Karachi%2C+Pakistan'</span>\n",
              "        <span style=\"font-weight: bold\">)</span>\n",
              "    <span style=\"font-weight: bold\">)</span>\n",
              "<span style=\"font-weight: bold\">]</span>\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "# Responses API\n",
        "\n",
        "https://platform.openai.com/docs/guides/tools-web-search?api-mode=responses"
      ],
      "metadata": {
        "id": "tCzSosP5K-JR"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "Model will choose to search the web or not based on the content of the input prompt."
      ],
      "metadata": {
        "id": "zEHOqHav3tTm"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "Note: The `user_location` object can be configured as shown below to specify the approximate user location in the search options\n",
        "\n",
        "In the Responses API, you can see that the `user_location` object does not contain a nested `approximate` object, unlike in the Chat API.\n",
        "```\n",
        "\"user_location\": {\n",
        "    \"type\": \"approximate\",\n",
        "    \"country\": \"PK\",\n",
        "    \"city\": \"Lahore\",\n",
        "    \"region\": \"Punjab\",\n",
        "}\n",
        "```"
      ],
      "metadata": {
        "id": "9RzqTpyW3vL1"
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "Sometimes, the model may not feel the need to call the web search preview tool. In such cases, it might respond with a message asking the user to specify the location or return results that are not location-specific.\n",
        "\n",
        "To see the difference try this example multiple times"
      ],
      "metadata": {
        "id": "SJc4XLfG48yP"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "response = openai.responses.create(\n",
        "    model=MODEL,\n",
        "    tools=[{\n",
        "        \"type\": \"web_search_preview\",\n",
        "        \"user_location\": {\n",
        "            \"type\": \"approximate\",\n",
        "            \"country\": \"PK\",\n",
        "            \"city\": \"Lahore\",\n",
        "            \"region\": \"Punjab\",\n",
        "        }\n",
        "    }],\n",
        "    # input=\"List the best restaurants for Seafood\"\n",
        "    input=\"List the best restaurants for Seafood from current location\"\n",
        ")\n",
        "\n",
        "print(response.output_text)\n",
        "rich.print(response.output)\n",
        "rich.print(response.tools)\n",
        "# rich.print(response)"
      ],
      "metadata": {
        "id": "gUjC_PQCcETm",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        },
        "outputId": "acdc40ac-200a-45a0-a44c-79f8942c8f58"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Lahore offers a variety of excellent seafood restaurants that cater to diverse tastes. Here are some top recommendations:\n",
            "\n",
            "**[Coastal Reef Seafood Restaurant](https://www.google.com/maps/search/Coastal+Reef+Seafood+Restaurant%2C+Lahore%2C+Pakistan)**\n",
            "_Lahore, Pakistan_\n",
            "A premier seafood spot in DHA, offering a wide variety of dishes in a cozy, family-friendly atmosphere.\n",
            "\n",
            "**[The Fisherman's Wharf](https://www.google.com/maps/search/The+Fisherman%27s+Wharf%2C+Lahore%2C+Pakistan)**\n",
            "_Lahore, Pakistan_\n",
            "Inspired by coastal dining styles, this restaurant offers fresh seafood in a relaxed ambiance, located in the iconic Food Street area.\n",
            "\n",
            "**[Siddique Fish Corner](https://www.google.com/maps/search/Siddique+Fish+Corner%2C+Lahore%2C+Pakistan)**\n",
            "_Lahore, Pakistan_\n",
            "Renowned for its fresh River Rahu, cooked with pure mustard oil to enhance flavor, offering a unique seafood experience.\n",
            "\n",
            "**[Bashir Darul Mahi](https://www.google.com/maps/search/Bashir+Darul+Mahi%2C+Lahore%2C+Pakistan)**\n",
            "_Lahore, Pakistan_\n",
            "A well-established seafood restaurant with multiple locations, known for its Lahori-style fish and seafood delicacies.\n",
            "\n",
            "**[Sardar Fish](https://www.google.com/maps/search/Sardar+Fish%2C+Lahore%2C+Pakistan)**\n",
            "_Lahore, Pakistan_\n",
            "Popular for its mouthwatering seafood dishes, especially grilled fish marinated with a delightful blend of spices.\n",
            "\n",
            "**[Caspian Sea](https://www.google.com/maps/search/Caspian+Sea%2C+Lahore%2C+Pakistan)**\n",
            "_Lahore, Pakistan_\n",
            "Offers a wide selection of seafood dishes inspired by the Caspian region's rich culinary heritage.\n",
            "\n",
            "**[Blow Fish Restaurant](https://www.google.com/maps/search/Blow+Fish+Restaurant%2C+Lahore%2C+Pakistan)**\n",
            "_Lahore, Pakistan_\n",
            "Known for its mouthwatering broiled fish, offering a genuinely extraordinary culinary experience.\n",
            "\n",
            "**[Bistro 201](https://www.google.com/maps/search/Bistro+201%2C+Lahore%2C+Pakistan)**\n",
            "_Lahore, Pakistan_\n",
            "Provides a distinctive and modern dining experience with a focus on using only the finest ingredients.\n",
            "\n",
            "These establishments are celebrated for their quality seafood offerings and inviting atmospheres, making them excellent choices for seafood enthusiasts in Lahore. \n"
          ]
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[1m[\u001b[0m\n",
              "    \u001b[1;35mResponseFunctionWebSearch\u001b[0m\u001b[1m(\u001b[0m\n",
              "        \u001b[33mid\u001b[0m=\u001b[32m'ws_67e38e65acc08192b6e1dde3137aed160fe795cc4c7994da'\u001b[0m,\n",
              "        \u001b[33mstatus\u001b[0m=\u001b[32m'completed'\u001b[0m,\n",
              "        \u001b[33mtype\u001b[0m=\u001b[32m'web_search_call'\u001b[0m\n",
              "    \u001b[1m)\u001b[0m,\n",
              "    \u001b[1;35mResponseOutputMessage\u001b[0m\u001b[1m(\u001b[0m\n",
              "        \u001b[33mid\u001b[0m=\u001b[32m'msg_67e38e683e848192b16db8f3081fd1db0fe795cc4c7994da'\u001b[0m,\n",
              "        \u001b[33mcontent\u001b[0m=\u001b[1m[\u001b[0m\n",
              "            \u001b[1;35mResponseOutputText\u001b[0m\u001b[1m(\u001b[0m\n",
              "                \u001b[33mannotations\u001b[0m=\u001b[1m[\u001b[0m\n",
              "                    \u001b[1;35mAnnotationURLCitation\u001b[0m\u001b[1m(\u001b[0m\n",
              "                        \u001b[33mend_index\u001b[0m=\u001b[1;36m248\u001b[0m,\n",
              "                        \u001b[33mstart_index\u001b[0m=\u001b[1;36m125\u001b[0m,\n",
              "                        \u001b[33mtitle\u001b[0m=\u001b[32m'Coastal Reef Seafood Restaurant'\u001b[0m,\n",
              "                        \u001b[33mtype\u001b[0m=\u001b[32m'url_citation'\u001b[0m,\n",
              "                        \u001b[33murl\u001b[0m=\u001b[32m'https://www.google.com/maps/search/Coastal+Reef+Seafood+Restaurant%2C+Lahore%2C+Pakist\u001b[0m\n",
              "\u001b[32man'\u001b[0m\n",
              "                    \u001b[1m)\u001b[0m,\n",
              "                    \u001b[1;35mAnnotationURLCitation\u001b[0m\u001b[1m(\u001b[0m\n",
              "                        \u001b[33mend_index\u001b[0m=\u001b[1;36m482\u001b[0m,\n",
              "                        \u001b[33mstart_index\u001b[0m=\u001b[1;36m377\u001b[0m,\n",
              "                        \u001b[33mtitle\u001b[0m=\u001b[32m\"The\u001b[0m\u001b[32m Fisherman's Wharf\"\u001b[0m,\n",
              "                        \u001b[33mtype\u001b[0m=\u001b[32m'url_citation'\u001b[0m,\n",
              "                        \u001b[33murl\u001b[0m=\u001b[32m'https://www.google.com/maps/search/The+Fisherman%27s+Wharf%2C+Lahore%2C+Pakistan'\u001b[0m\n",
              "                    \u001b[1m)\u001b[0m,\n",
              "                    \u001b[1;35mAnnotationURLCitation\u001b[0m\u001b[1m(\u001b[0m\n",
              "                        \u001b[33mend_index\u001b[0m=\u001b[1;36m743\u001b[0m,\n",
              "                        \u001b[33mstart_index\u001b[0m=\u001b[1;36m642\u001b[0m,\n",
              "                        \u001b[33mtitle\u001b[0m=\u001b[32m'Siddique Fish Corner'\u001b[0m,\n",
              "                        \u001b[33mtype\u001b[0m=\u001b[32m'url_citation'\u001b[0m,\n",
              "                        \u001b[33murl\u001b[0m=\u001b[32m'https://www.google.com/maps/search/Siddique+Fish+Corner%2C+Lahore%2C+Pakistan'\u001b[0m\n",
              "                    \u001b[1m)\u001b[0m,\n",
              "                    \u001b[1;35mAnnotationURLCitation\u001b[0m\u001b[1m(\u001b[0m\n",
              "                        \u001b[33mend_index\u001b[0m=\u001b[1;36m984\u001b[0m,\n",
              "                        \u001b[33mstart_index\u001b[0m=\u001b[1;36m889\u001b[0m,\n",
              "                        \u001b[33mtitle\u001b[0m=\u001b[32m'Bashir Darul Mahi'\u001b[0m,\n",
              "                        \u001b[33mtype\u001b[0m=\u001b[32m'url_citation'\u001b[0m,\n",
              "                        \u001b[33murl\u001b[0m=\u001b[32m'https://www.google.com/maps/search/Bashir+Darul+Mahi%2C+Lahore%2C+Pakistan'\u001b[0m\n",
              "                    \u001b[1m)\u001b[0m,\n",
              "                    \u001b[1;35mAnnotationURLCitation\u001b[0m\u001b[1m(\u001b[0m\n",
              "                        \u001b[33mend_index\u001b[0m=\u001b[1;36m1211\u001b[0m,\n",
              "                        \u001b[33mstart_index\u001b[0m=\u001b[1;36m1128\u001b[0m,\n",
              "                        \u001b[33mtitle\u001b[0m=\u001b[32m'Sardar Fish'\u001b[0m,\n",
              "                        \u001b[33mtype\u001b[0m=\u001b[32m'url_citation'\u001b[0m,\n",
              "                        \u001b[33murl\u001b[0m=\u001b[32m'https://www.google.com/maps/search/Sardar+Fish%2C+Lahore%2C+Pakistan'\u001b[0m\n",
              "                    \u001b[1m)\u001b[0m,\n",
              "                    \u001b[1;35mAnnotationURLCitation\u001b[0m\u001b[1m(\u001b[0m\n",
              "                        \u001b[33mend_index\u001b[0m=\u001b[1;36m1434\u001b[0m,\n",
              "                        \u001b[33mstart_index\u001b[0m=\u001b[1;36m1351\u001b[0m,\n",
              "                        \u001b[33mtitle\u001b[0m=\u001b[32m'Caspian Sea'\u001b[0m,\n",
              "                        \u001b[33mtype\u001b[0m=\u001b[32m'url_citation'\u001b[0m,\n",
              "                        \u001b[33murl\u001b[0m=\u001b[32m'https://www.google.com/maps/search/Caspian+Sea%2C+Lahore%2C+Pakistan'\u001b[0m\n",
              "                    \u001b[1m)\u001b[0m,\n",
              "                    \u001b[1;35mAnnotationURLCitation\u001b[0m\u001b[1m(\u001b[0m\n",
              "                        \u001b[33mend_index\u001b[0m=\u001b[1;36m1659\u001b[0m,\n",
              "                        \u001b[33mstart_index\u001b[0m=\u001b[1;36m1558\u001b[0m,\n",
              "                        \u001b[33mtitle\u001b[0m=\u001b[32m'Blow Fish Restaurant'\u001b[0m,\n",
              "                        \u001b[33mtype\u001b[0m=\u001b[32m'url_citation'\u001b[0m,\n",
              "                        \u001b[33murl\u001b[0m=\u001b[32m'https://www.google.com/maps/search/Blow+Fish+Restaurant%2C+Lahore%2C+Pakistan'\u001b[0m\n",
              "                    \u001b[1m)\u001b[0m,\n",
              "                    \u001b[1;35mAnnotationURLCitation\u001b[0m\u001b[1m(\u001b[0m\n",
              "                        \u001b[33mend_index\u001b[0m=\u001b[1;36m1863\u001b[0m,\n",
              "                        \u001b[33mstart_index\u001b[0m=\u001b[1;36m1782\u001b[0m,\n",
              "                        \u001b[33mtitle\u001b[0m=\u001b[32m'Bistro 201'\u001b[0m,\n",
              "                        \u001b[33mtype\u001b[0m=\u001b[32m'url_citation'\u001b[0m,\n",
              "                        \u001b[33murl\u001b[0m=\u001b[32m'https://www.google.com/maps/search/Bistro+201%2C+Lahore%2C+Pakistan'\u001b[0m\n",
              "                    \u001b[1m)\u001b[0m\n",
              "                \u001b[1m]\u001b[0m,\n",
              "                \u001b[33mtext\u001b[0m=\u001b[32m\"Lahore\u001b[0m\u001b[32m offers a variety of excellent seafood restaurants that cater to diverse tastes. Here \u001b[0m\n",
              "\u001b[32mare some top recommendations:\\n\\n**\u001b[0m\u001b[32m[\u001b[0m\u001b[32mCoastal Reef Seafood \u001b[0m\n",
              "\u001b[32mRestaurant\u001b[0m\u001b[32m]\u001b[0m\u001b[32m(\u001b[0m\u001b[32mhttps://www.google.com/maps/search/Coastal+Reef+Seafood+Restaurant%2C+Lahore%2C+Pakistan\u001b[0m\u001b[32m)\u001b[0m\u001b[32m**\\n_Lahore, \u001b[0m\n",
              "\u001b[32mPakistan_\\nA premier seafood spot in DHA, offering a wide variety of dishes in a cozy, family-friendly \u001b[0m\n",
              "\u001b[32matmosphere.\\n\\n**\u001b[0m\u001b[32m[\u001b[0m\u001b[32mThe Fisherman's \u001b[0m\n",
              "\u001b[32mWharf\u001b[0m\u001b[32m]\u001b[0m\u001b[32m(\u001b[0m\u001b[32mhttps://www.google.com/maps/search/The+Fisherman%27s+Wharf%2C+Lahore%2C+Pakistan\u001b[0m\u001b[32m)\u001b[0m\u001b[32m**\\n_Lahore, \u001b[0m\n",
              "\u001b[32mPakistan_\\nInspired by coastal dining styles, this restaurant offers fresh seafood in a relaxed ambiance, located \u001b[0m\n",
              "\u001b[32min the iconic Food Street area.\\n\\n**\u001b[0m\u001b[32m[\u001b[0m\u001b[32mSiddique Fish \u001b[0m\n",
              "\u001b[32mCorner\u001b[0m\u001b[32m]\u001b[0m\u001b[32m(\u001b[0m\u001b[32mhttps://www.google.com/maps/search/Siddique+Fish+Corner%2C+Lahore%2C+Pakistan\u001b[0m\u001b[32m)\u001b[0m\u001b[32m**\\n_Lahore, \u001b[0m\n",
              "\u001b[32mPakistan_\\nRenowned for its fresh River Rahu, cooked with pure mustard oil to enhance flavor, offering a unique \u001b[0m\n",
              "\u001b[32mseafood experience.\\n\\n**\u001b[0m\u001b[32m[\u001b[0m\u001b[32mBashir Darul \u001b[0m\n",
              "\u001b[32mMahi\u001b[0m\u001b[32m]\u001b[0m\u001b[32m(\u001b[0m\u001b[32mhttps://www.google.com/maps/search/Bashir+Darul+Mahi%2C+Lahore%2C+Pakistan\u001b[0m\u001b[32m)\u001b[0m\u001b[32m**\\n_Lahore, Pakistan_\\nA \u001b[0m\n",
              "\u001b[32mwell-established seafood restaurant with multiple locations, known for its Lahori-style fish and seafood \u001b[0m\n",
              "\u001b[32mdelicacies.\\n\\n**\u001b[0m\u001b[32m[\u001b[0m\u001b[32mSardar Fish\u001b[0m\u001b[32m]\u001b[0m\u001b[32m(\u001b[0m\u001b[32mhttps://www.google.com/maps/search/Sardar+Fish%2C+Lahore%2C+Pakistan\u001b[0m\u001b[32m)\u001b[0m\u001b[32m**\\n_Lahore, \u001b[0m\n",
              "\u001b[32mPakistan_\\nPopular for its mouthwatering seafood dishes, especially grilled fish marinated with a delightful blend \u001b[0m\n",
              "\u001b[32mof spices.\\n\\n**\u001b[0m\u001b[32m[\u001b[0m\u001b[32mCaspian Sea\u001b[0m\u001b[32m]\u001b[0m\u001b[32m(\u001b[0m\u001b[32mhttps://www.google.com/maps/search/Caspian+Sea%2C+Lahore%2C+Pakistan\u001b[0m\u001b[32m)\u001b[0m\u001b[32m**\\n_Lahore, \u001b[0m\n",
              "\u001b[32mPakistan_\\nOffers a wide selection of seafood dishes inspired by the Caspian region's rich culinary \u001b[0m\n",
              "\u001b[32mheritage.\\n\\n**\u001b[0m\u001b[32m[\u001b[0m\u001b[32mBlow Fish \u001b[0m\n",
              "\u001b[32mRestaurant\u001b[0m\u001b[32m]\u001b[0m\u001b[32m(\u001b[0m\u001b[32mhttps://www.google.com/maps/search/Blow+Fish+Restaurant%2C+Lahore%2C+Pakistan\u001b[0m\u001b[32m)\u001b[0m\u001b[32m**\\n_Lahore, \u001b[0m\n",
              "\u001b[32mPakistan_\\nKnown for its mouthwatering broiled fish, offering a genuinely extraordinary culinary \u001b[0m\n",
              "\u001b[32mexperience.\\n\\n**\u001b[0m\u001b[32m[\u001b[0m\u001b[32mBistro 201\u001b[0m\u001b[32m]\u001b[0m\u001b[32m(\u001b[0m\u001b[32mhttps://www.google.com/maps/search/Bistro+201%2C+Lahore%2C+Pakistan\u001b[0m\u001b[32m)\u001b[0m\u001b[32m**\\n_Lahore, \u001b[0m\n",
              "\u001b[32mPakistan_\\nProvides a distinctive and modern dining experience with a focus on using only the finest \u001b[0m\n",
              "\u001b[32mingredients.\\n\\nThese establishments are celebrated for their quality seafood offerings and inviting atmospheres, \u001b[0m\n",
              "\u001b[32mmaking them excellent choices for seafood enthusiasts in Lahore. \"\u001b[0m,\n",
              "                \u001b[33mtype\u001b[0m=\u001b[32m'output_text'\u001b[0m\n",
              "            \u001b[1m)\u001b[0m\n",
              "        \u001b[1m]\u001b[0m,\n",
              "        \u001b[33mrole\u001b[0m=\u001b[32m'assistant'\u001b[0m,\n",
              "        \u001b[33mstatus\u001b[0m=\u001b[32m'completed'\u001b[0m,\n",
              "        \u001b[33mtype\u001b[0m=\u001b[32m'message'\u001b[0m\n",
              "    \u001b[1m)\u001b[0m\n",
              "\u001b[1m]\u001b[0m\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">[</span>\n",
              "    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">ResponseFunctionWebSearch</span><span style=\"font-weight: bold\">(</span>\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">id</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'ws_67e38e65acc08192b6e1dde3137aed160fe795cc4c7994da'</span>,\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">status</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'completed'</span>,\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'web_search_call'</span>\n",
              "    <span style=\"font-weight: bold\">)</span>,\n",
              "    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">ResponseOutputMessage</span><span style=\"font-weight: bold\">(</span>\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">id</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'msg_67e38e683e848192b16db8f3081fd1db0fe795cc4c7994da'</span>,\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">content</span>=<span style=\"font-weight: bold\">[</span>\n",
              "            <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">ResponseOutputText</span><span style=\"font-weight: bold\">(</span>\n",
              "                <span style=\"color: #808000; text-decoration-color: #808000\">annotations</span>=<span style=\"font-weight: bold\">[</span>\n",
              "                    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AnnotationURLCitation</span><span style=\"font-weight: bold\">(</span>\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">end_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">248</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">start_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">125</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">title</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'Coastal Reef Seafood Restaurant'</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'url_citation'</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">url</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'https://www.google.com/maps/search/Coastal+Reef+Seafood+Restaurant%2C+Lahore%2C+Pakist</span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">an'</span>\n",
              "                    <span style=\"font-weight: bold\">)</span>,\n",
              "                    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AnnotationURLCitation</span><span style=\"font-weight: bold\">(</span>\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">end_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">482</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">start_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">377</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">title</span>=<span style=\"color: #008000; text-decoration-color: #008000\">\"The Fisherman's Wharf\"</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'url_citation'</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">url</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'https://www.google.com/maps/search/The+Fisherman%27s+Wharf%2C+Lahore%2C+Pakistan'</span>\n",
              "                    <span style=\"font-weight: bold\">)</span>,\n",
              "                    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AnnotationURLCitation</span><span style=\"font-weight: bold\">(</span>\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">end_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">743</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">start_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">642</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">title</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'Siddique Fish Corner'</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'url_citation'</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">url</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'https://www.google.com/maps/search/Siddique+Fish+Corner%2C+Lahore%2C+Pakistan'</span>\n",
              "                    <span style=\"font-weight: bold\">)</span>,\n",
              "                    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AnnotationURLCitation</span><span style=\"font-weight: bold\">(</span>\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">end_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">984</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">start_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">889</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">title</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'Bashir Darul Mahi'</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'url_citation'</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">url</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'https://www.google.com/maps/search/Bashir+Darul+Mahi%2C+Lahore%2C+Pakistan'</span>\n",
              "                    <span style=\"font-weight: bold\">)</span>,\n",
              "                    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AnnotationURLCitation</span><span style=\"font-weight: bold\">(</span>\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">end_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1211</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">start_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1128</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">title</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'Sardar Fish'</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'url_citation'</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">url</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'https://www.google.com/maps/search/Sardar+Fish%2C+Lahore%2C+Pakistan'</span>\n",
              "                    <span style=\"font-weight: bold\">)</span>,\n",
              "                    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AnnotationURLCitation</span><span style=\"font-weight: bold\">(</span>\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">end_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1434</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">start_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1351</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">title</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'Caspian Sea'</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'url_citation'</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">url</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'https://www.google.com/maps/search/Caspian+Sea%2C+Lahore%2C+Pakistan'</span>\n",
              "                    <span style=\"font-weight: bold\">)</span>,\n",
              "                    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AnnotationURLCitation</span><span style=\"font-weight: bold\">(</span>\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">end_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1659</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">start_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1558</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">title</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'Blow Fish Restaurant'</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'url_citation'</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">url</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'https://www.google.com/maps/search/Blow+Fish+Restaurant%2C+Lahore%2C+Pakistan'</span>\n",
              "                    <span style=\"font-weight: bold\">)</span>,\n",
              "                    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">AnnotationURLCitation</span><span style=\"font-weight: bold\">(</span>\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">end_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1863</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">start_index</span>=<span style=\"color: #008080; text-decoration-color: #008080; font-weight: bold\">1782</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">title</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'Bistro 201'</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'url_citation'</span>,\n",
              "                        <span style=\"color: #808000; text-decoration-color: #808000\">url</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'https://www.google.com/maps/search/Bistro+201%2C+Lahore%2C+Pakistan'</span>\n",
              "                    <span style=\"font-weight: bold\">)</span>\n",
              "                <span style=\"font-weight: bold\">]</span>,\n",
              "                <span style=\"color: #808000; text-decoration-color: #808000\">text</span>=<span style=\"color: #008000; text-decoration-color: #008000\">\"Lahore offers a variety of excellent seafood restaurants that cater to diverse tastes. Here </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">are some top recommendations:\\n\\n**[Coastal Reef Seafood </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">Restaurant](https://www.google.com/maps/search/Coastal+Reef+Seafood+Restaurant%2C+Lahore%2C+Pakistan)**\\n_Lahore, </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">Pakistan_\\nA premier seafood spot in DHA, offering a wide variety of dishes in a cozy, family-friendly </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">atmosphere.\\n\\n**[The Fisherman's </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">Wharf](https://www.google.com/maps/search/The+Fisherman%27s+Wharf%2C+Lahore%2C+Pakistan)**\\n_Lahore, </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">Pakistan_\\nInspired by coastal dining styles, this restaurant offers fresh seafood in a relaxed ambiance, located </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">in the iconic Food Street area.\\n\\n**[Siddique Fish </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">Corner](https://www.google.com/maps/search/Siddique+Fish+Corner%2C+Lahore%2C+Pakistan)**\\n_Lahore, </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">Pakistan_\\nRenowned for its fresh River Rahu, cooked with pure mustard oil to enhance flavor, offering a unique </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">seafood experience.\\n\\n**[Bashir Darul </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">Mahi](https://www.google.com/maps/search/Bashir+Darul+Mahi%2C+Lahore%2C+Pakistan)**\\n_Lahore, Pakistan_\\nA </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">well-established seafood restaurant with multiple locations, known for its Lahori-style fish and seafood </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">delicacies.\\n\\n**[Sardar Fish](https://www.google.com/maps/search/Sardar+Fish%2C+Lahore%2C+Pakistan)**\\n_Lahore, </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">Pakistan_\\nPopular for its mouthwatering seafood dishes, especially grilled fish marinated with a delightful blend </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">of spices.\\n\\n**[Caspian Sea](https://www.google.com/maps/search/Caspian+Sea%2C+Lahore%2C+Pakistan)**\\n_Lahore, </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">Pakistan_\\nOffers a wide selection of seafood dishes inspired by the Caspian region's rich culinary </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">heritage.\\n\\n**[Blow Fish </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">Restaurant](https://www.google.com/maps/search/Blow+Fish+Restaurant%2C+Lahore%2C+Pakistan)**\\n_Lahore, </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">Pakistan_\\nKnown for its mouthwatering broiled fish, offering a genuinely extraordinary culinary </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">experience.\\n\\n**[Bistro 201](https://www.google.com/maps/search/Bistro+201%2C+Lahore%2C+Pakistan)**\\n_Lahore, </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">Pakistan_\\nProvides a distinctive and modern dining experience with a focus on using only the finest </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">ingredients.\\n\\nThese establishments are celebrated for their quality seafood offerings and inviting atmospheres, </span>\n",
              "<span style=\"color: #008000; text-decoration-color: #008000\">making them excellent choices for seafood enthusiasts in Lahore. \"</span>,\n",
              "                <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'output_text'</span>\n",
              "            <span style=\"font-weight: bold\">)</span>\n",
              "        <span style=\"font-weight: bold\">]</span>,\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">role</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'assistant'</span>,\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">status</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'completed'</span>,\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'message'</span>\n",
              "    <span style=\"font-weight: bold\">)</span>\n",
              "<span style=\"font-weight: bold\">]</span>\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        },
        {
          "output_type": "display_data",
          "data": {
            "text/plain": [
              "\u001b[1m[\u001b[0m\n",
              "    \u001b[1;35mWebSearchTool\u001b[0m\u001b[1m(\u001b[0m\n",
              "        \u001b[33mtype\u001b[0m=\u001b[32m'web_search_preview'\u001b[0m,\n",
              "        \u001b[33msearch_context_size\u001b[0m=\u001b[32m'medium'\u001b[0m,\n",
              "        \u001b[33muser_location\u001b[0m=\u001b[1;35mUserLocation\u001b[0m\u001b[1m(\u001b[0m\n",
              "            \u001b[33mtype\u001b[0m=\u001b[32m'approximate'\u001b[0m,\n",
              "            \u001b[33mcity\u001b[0m=\u001b[32m'Lahore'\u001b[0m,\n",
              "            \u001b[33mcountry\u001b[0m=\u001b[32m'PK'\u001b[0m,\n",
              "            \u001b[33mregion\u001b[0m=\u001b[32m'Punjab'\u001b[0m,\n",
              "            \u001b[33mtimezone\u001b[0m=\u001b[3;35mNone\u001b[0m\n",
              "        \u001b[1m)\u001b[0m\n",
              "    \u001b[1m)\u001b[0m\n",
              "\u001b[1m]\u001b[0m\n"
            ],
            "text/html": [
              "<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"font-weight: bold\">[</span>\n",
              "    <span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">WebSearchTool</span><span style=\"font-weight: bold\">(</span>\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'web_search_preview'</span>,\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">search_context_size</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'medium'</span>,\n",
              "        <span style=\"color: #808000; text-decoration-color: #808000\">user_location</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">UserLocation</span><span style=\"font-weight: bold\">(</span>\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">type</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'approximate'</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">city</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'Lahore'</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">country</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'PK'</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">region</span>=<span style=\"color: #008000; text-decoration-color: #008000\">'Punjab'</span>,\n",
              "            <span style=\"color: #808000; text-decoration-color: #808000\">timezone</span>=<span style=\"color: #800080; text-decoration-color: #800080; font-style: italic\">None</span>\n",
              "        <span style=\"font-weight: bold\">)</span>\n",
              "    <span style=\"font-weight: bold\">)</span>\n",
              "<span style=\"font-weight: bold\">]</span>\n",
              "</pre>\n"
            ]
          },
          "metadata": {}
        }
      ]
    }
  ]
}